#ifndef TRIANGULATE3D_H
#define TRIANGULATE3D_H

#include <opencv2/opencv.hpp>
#include <QString>
#include <QObject>
#include <QImage>


using namespace cv;
using namespace std;


class triangulate3D: public QObject {
    Q_OBJECT


public slots:
    int doIt(); //main processing function
    void terminateProcessing(); //user clicked the terminate button

signals:
    void finished();
    void status(int);

public:
    triangulate3D();
    int init(QString projName, QString eventName, int camNumber, QString camRes);

private:

    void triangulatePoints(Mat pts);
    void write3Dpoints();

    Mat cameraMatrix;  // Camera Intrinsic Parameters
    Mat distCoeffs;    // Camera Distortion Coefficients

    Mat imagePoints;  //Registration target points selected for this camera, in Image space
    Mat objectPoints; //Registration target coordinates in World space

    Mat lasers; //laser spacing

    FileStorage fsout,fsinput; //input and output files

    Mat rvec;
    Mat tvec;
    Mat rotationMatrix;

    bool terminateCheck;









};

#endif // TRIANGULATE3D_H
